#include <iostream>
using namespace std;

int change(int x){
	int a=x/10;
	int b=x%10;
	int ans=b*10+a;
	return ans;
}

int main(){
	int count=0;
	for(int i=27;i<=99;++i){
		if(change(i)==(i-27)){
			count++;
		}
	}
	cout<<count;
	return 0;
}
